package com.stu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.stu.entity.Student;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentMapper extends BaseMapper<Student> {
    @Select("select student.*,class.name as Cname,major.name as Tname,college.name as Mname1 from student,class,major,college where student.cno = class.cno and class.tno = major.tno and major.mno = college.mno")
    public List<Student> getStuList();
    @Select("select student.*,class.name as Cname,major.name as Tname,college.name as Mname1 from student,class,major,college where student.cno = class.cno and class.tno = major.tno and major.mno = college.mno limit ${page},${limit}")
    public List<Student> getPage(@Param("page")Integer page,@Param("limit")Integer limit);
}
